package com.wuqing.mybatisredisdemo.service.impl;

import com.wuqing.mybatisredisdemo.entity.Class;
import com.wuqing.mybatisredisdemo.mapper.ClassMapper;
import com.wuqing.mybatisredisdemo.service.ClassService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 卢文昊
 * @since 2021-08-10
 */
@Service
public class ClassServiceImpl extends ServiceImpl<ClassMapper, Class> implements ClassService {
    @Autowired
    private ClassMapper classMapper;

    @Override
    public String updateNameById(Integer id, String name){
        return classMapper.updateNameById(id, name) > 0 ? "修改成功！" : "修改失败";
    }
}
